package com.niii.statistics.controller;

import com.niii.statistics.common.Result;
import com.niii.statistics.common.StatusCode;
import com.niii.statistics.service.ProvincialgdpService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@Api(tags = "Provincialpop",description = "浙江省人口")
@RestController
@RequestMapping(value = "/ProvincialPop")
@CrossOrigin(origins ="*" , maxAge = 3600)
public class ProvincialPopController {

    @Autowired
    private ProvincialgdpService provincialgdpService;

    @RequestMapping(value = "/getPopByProvince",method = RequestMethod.GET)
    public Result getProvincialPop(@RequestParam String provincialName){
        return new Result(true, StatusCode.OK,"查询成功",provincialgdpService.getProvincialPop(provincialName));
    }
}
